package com.gmrz.webauthn.protocol.v1.schema;

public enum AttestationFormat {
    NONE("none"),
    PACKED("packed"),
    TPM("tpm"),
    ANROID_KEY("android-key"),
    U2F("fido-u2f"),
    ANROID_SAFETYNET("android-safetynet");

    private String mValue;

    AttestationFormat(String value) {
        this.mValue = value;
    }

    public String getName() {
        return this.mValue;
    }

    public static AttestationFormat forName(String name) {
        for (AttestationFormat format : values()) {
            if (format.getName().equalsIgnoreCase(name)) {
                return format;
            }
        }
        throw new IllegalArgumentException("Invalid attestation format: " + name);
    }

    public String toString() {
        return this.mValue;
    }
}
